﻿using System;
using System.Drawing;
using System.IO;
using Infrastructure.Utilities;

namespace LuckyDraw.WinUI
{
	[Serializable]
	public class DesignerSetting
	{
		private const string FileName = "DesignerSetting.xml";

		public void Save()
		{
			ObjectSerializer.XmlSerialize<DesignerSetting>(this, FileName);
		}

		public static DesignerSetting Load()
		{
			if (File.Exists(FileName))
			{
				DesignerSetting setting = ObjectSerializer.XmlDeserialize<DesignerSetting>(FileName);
				return setting;
			}
			return null;
		}

		#region - 窗体 -

		public int FormWidth //窗体宽度。
		{
			get;
			set;
		}

		public int FormHeight //窗体高度。
		{
			get;
			set;
		}

		public string BackgroundImage //窗体底图。
		{
			get;
			set;
		}

		#endregion

		#region - Logo图 -

		public string LogoImage //Logo图。
		{
			get;
			set;
		}

		public int LogoWidht //Logo图宽度。
		{
			get;
			set;
		}

		public int LogoHeight  //Logo图高度。
		{
			get;
			set;
		}

		public int LogoX //Logo图X坐标。
		{
			get;
			set;
		}

		public int LogoY //Logo图Y坐标。
		{
			get;
			set;
		}

		#endregion

		#region - 奖劵号码 -

		public int CouponNoX //奖劵号码X坐标。
		{
			get;
			set;
		}

		public int CouponNoY //奖劵号码Y坐标。
		{
			get;
			set;
		}

		public string CouponNoFontName //奖劵号码字体名称。
		{
			get;
			set;
		}

		public float CouponNoFontSize // 字体大小
		{
			get;
			set;
		}

		public string CouponNoForeColor //文字颜色。
		{
			get;
			set;
		}

		#endregion

		#region - 抽奖按钮 -

		public int DrawButtonX //奖劵号码X坐标。
		{
			get;
			set;
		}

		public int DrawButtonY //奖劵号码Y坐标。
		{
			get;
			set;
		}

		public string DrawButtonFontName //奖劵号码字体名称。
		{
			get;
			set;
		}

		public float DrawButtonFontSize // 字体大小
		{
			get;
			set;
		}

		public string DrawButtonForeColor //文字颜色。
		{
			get;
			set;
		}

		#endregion

		#region - 抽奖类型标签 -

		public int PrizeTypeLabelX
		{
			get;
			set;
		}

		public int PrizeTypeLabelY
		{
			get;
			set;
		}

		public string PrizeTypeLabelFontName
		{
			get;
			set;
		}

		public float PrizeTypeLabelFontSize
		{
			get;
			set;
		}

		public string PrizeTypeLabelForeColor
		{
			get;
			set;
		}

		public bool PrizeTypeLabelVisual
		{
			get;
			set;
		}

		#endregion

		#region - 抽奖类型下拉列表框 -

		public int PrizeTypeComboX
		{
			get;
			set;
		}

		public int PrizeTypeComboY
		{
			get;
			set;
		}

		public string PrizeTypeComboFontName
		{
			get;
			set;
		}

		public float PrizeTypeComboFontSize
		{
			get;
			set;
		}

		#endregion

		#region - 中奖列表 -

		public int WinningX
		{
			get;
			set;
		}

		public int WinningY
		{
			get;
			set;
		}

		public int WinningWidth
		{
			get;
			set;
		}

		public int WinningHeight
		{
			get;
			set;
		}

		public string WinningFontName
		{
			get;
			set;
		}

		public float WinningFontSize
		{
			get;
			set;
		}

		public string WinningForeColor
		{
			get;
			set;
		}

		#endregion

		#region - 中奖名单标签 -

		public int WinningLabelX
		{
			get;
			set;
		}

		public int WinningLabelY
		{
			get;
			set;
		}

		public string WinningLabelFontName
		{
			get;
			set;
		}

		public float WinningLabelFontSize
		{
			get;
			set;
		}

		public string WinningLabelForeColor
		{
			get;
			set;
		}

		#endregion
	}
}
